package com.hxl.aop.config;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * Biz数据源配置类
 *
 * @author 霍帅帅
 * @since 2024-08-20 22:53
 */
@Configuration
public class BizDataSourceConfig {
    @Bean(name = "bizDataSource")
    @Qualifier("bizDataSource")
    @ConfigurationProperties(prefix = "biz")
    public DataSource getMyDataSource() {
        return DataSourceBuilder.create().build();
    }

}
